﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>Tree</title>
    <link href="/Content/style.css" rel="stylesheet" type="text/css" />
    <script src="../../../../Scripts/jquery.min.js" type="text/javascript"></script>
    <script src="../../../../Scripts/jqTreeTable/js/jquery.treetable.js" type="text/javascript"></script>
    <script src="../../../../Scripts/bootstrap/css/bootstrap.min.css" type="text/javascript"></script>
    <link rel="stylesheet" href="../../../../Scripts/jqTreeTable/css/jquery.treetable.css" />
    <link rel="stylesheet" href="../../../../Scripts/jqTreeTable/css/jquery.treetable.theme.my.css" />
    <script language="javascript" type="text/javascript">
        $(function () {
            //$("#example-basic-expandable").treetable({ expandable: true });

            //$("#depList").treetable({ expandable: true });
            $(".table").treetable({ expandable: true });
        })
    </script>
    <style type="text/css">
        .table thead tr th:first-child
        {
        }
    </style>
</head>
<body>
    <table id="example-basic-expandable">
        <tr data-tt-id="0">
            <td>
                app
            </td>
        </tr>
        <tr data-tt-id="1" data-tt-parent-id="0">
            <td>
                controllers
            </td>
        </tr>
        <tr data-tt-id="5" data-tt-parent-id="1">
            <td>
                application_controller.rb
            </td>
        </tr>
        <tr data-tt-id="2" data-tt-parent-id="0">
            <td>
                helpers
            </td>
        </tr>
        <tr data-tt-id="3" data-tt-parent-id="0">
            <td>
                models
            </td>
        </tr>
        <tr data-tt-id="4" data-tt-parent-id="0">
            <td>
                views
            </td>
        </tr>
    </table>
    <table id="depList" class="table table-striped table-bordered bootstrap-datatable datatable">
        <thead>
            <tr>
                <th>
                    名称
                </th>
                <th>
                    排序
                </th>
                <th>
                    上级部门
                </th>
                <th>
                    备注
                </th>
                <th>
                    操作
                </th>
            </tr>
        </thead>
        <tbody>
            <tr data-tt-id="d79288b6-afe0-4b8c-9f57-9654ec758794" data-tt-parent-id="">
                <td>
                    总部
                </td>
                <td style="width: 60px">
                    1
                </td>
                <td>
                </td>
                <td>
                    13123
                </td>
                <td class="action" style="width: 80px">
                    <a class="icon-edit" href="javascript:openEditor('update','d79288b6-afe0-4b8c-9f57-9654ec758794');"
                        title="修改"></a><a class="icon-book" href="javascript:openEditor('view','d79288b6-afe0-4b8c-9f57-9654ec758794');"
                            title="查看"></a><a class="icon-remove" href="javascript:openEditor('delete','d79288b6-afe0-4b8c-9f57-9654ec758794');"
                                title="删除"></a>
                </td>
            </tr>
            <tr data-tt-id="2ceeb1ac-3c9b-40a3-975f-cbcc7cb812db" data-tt-parent-id="d79288b6-afe0-4b8c-9f57-9654ec758794">
                <td>
                    IT部门
                </td>
                <td style="width: 60px">
                    2
                </td>
                <td>
                    总部
                </td>
                <td>
                    2222
                </td>
                <td class="action" style="width: 80px">
                    <a class="icon-edit" href="javascript:openEditor('update','2ceeb1ac-3c9b-40a3-975f-cbcc7cb812db');"
                        title="修改"></a><a class="icon-book" href="javascript:openEditor('view','2ceeb1ac-3c9b-40a3-975f-cbcc7cb812db');"
                            title="查看"></a><a class="icon-remove" href="javascript:openEditor('delete','2ceeb1ac-3c9b-40a3-975f-cbcc7cb812db');"
                                title="删除"></a>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="grid table table-striped table-bordered bootstrap-datatable datatable ">
        <thead>
            <tr>
                <th>
                    Row No
                </th>
                <th>
                    Description
                </th>
                <th>
                    Path to Row
                </th>
                <th>
                    Level
                </th>
                <th>
                    Status
                </th>
            </tr>
        </thead>
        <tbody>
            <tr data-tt-id="0">
                <td>
                    0
                </td>
                <td>
                    Child of 0
                </td>
                <td>
                    [0, 1]
                </td>
                <td>
                    1
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="1" data-tt-parent-id="0">
                <td>
                    1
                </td>
                <td>
                    Child of 0
                </td>
                <td>
                    [0, 1]
                </td>
                <td>
                    1
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="2" data-tt-parent-id="1">
                <td>
                    2
                </td>
                <td>
                    Child of 0
                </td>
                <td>
                    [0, 2]&nbsp;
                </td>
                <td>
                    1
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="3" data-tt-parent-id="1">
                <td>
                    3
                </td>
                <td>
                    Child of 2
                </td>
                <td>
                    [0, 2, 3]&nbsp;
                </td>
                <td>
                    2
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="4" data-tt-parent-id="1">
                <td>
                    4
                </td>
                <td>
                    Child of 3
                </td>
                <td>
                    [0, 2, 3, 4]&nbsp;
                </td>
                <td>
                    3
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="5" data-tt-parent-id="4">
                <td>
                    5
                </td>
                <td>
                    Child of 4
                </td>
                <td>
                    [0, 2, 3, 4, 5]&nbsp;
                </td>
                <td>
                    4
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="6" data-tt-parent-id="4">
                <td>
                    6
                </td>
                <td>
                    Child of 4
                </td>
                <td>
                    [0, 2, 3, 4, 6]&nbsp;
                </td>
                <td>
                    4
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="7" data-tt-parent-id="4">
                <td>
                    7
                </td>
                <td>
                    Child of 6
                </td>
                <td>
                    [0, 2, 3, 4, 6, 7]&nbsp;
                </td>
                <td>
                    5
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="8" data-tt-parent-id="7">
                <td>
                    8
                </td>
                <td>
                    Child of 4
                </td>
                <td>
                    [0, 2, 3, 4, 8]&nbsp;
                </td>
                <td>
                    4
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="9" data-tt-parent-id="7">
                <td>
                    9
                </td>
                <td>
                    Child of 2
                </td>
                <td>
                    [0, 2, 9]&nbsp;
                </td>
                <td>
                    2
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="10" data-tt-parent-id="9">
                <td>
                    10
                </td>
                <td>
                    Child of 9
                </td>
                <td>
                    [0, 2, 9, 10]&nbsp;
                </td>
                <td>
                    3
                </td>
                <td>
                </td>
            </tr>
            <tr data-tt-id="11" data-tt-parent-id="0">
                <td>
                    11
                </td>
                <td>
                    Child of 10
                </td>
                <td>
                    [0, 2, 9, 10, 11]&nbsp;
                </td>
                <td>
                    4
                </td>
                <td>
                </td>
            </tr>
        </tbody>
    </table>
</body>
</html>
